<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动1</title>
    <style>
        .box1 {
            width: 100px;
            height: 100px;
            background-color: greenyellow;
            float: left;
        }

        .box2 {
            width: 100px;
            height: 100px;
            background-color: lightskyblue;
            float: left;
        }
    </style>
</head>
<body>

<div class="box1"></div>
<div class="box2"></div>

</body>
</html>